{% extends "base.html" %}

{% block subtitle %}
  {{exploration_title}} (Statistics)
{% endblock subtitle %}

{% block content %}
  <div class="oppia-content">

    <h3>Statistics for '{{exploration_title}}'</h3>

    Number of visits: {{num_visits}}
    <br>
    Number of completions: {{num_comp}}
    <br>
    {% if num_visits > 0 %}
      Percent completing exercise: {{num_comp/num_visits * 100}}%
    {% endif %}

    <h4>Answers that triggered the default category</h4>

    <table>
      <tr>
        <th class="oppia-stats-table">State name</th>
        <th class="oppia-stats-table">Answers</th>
      </tr>
      {% for state in answers %}
        <tr>
          <td class="oppia-stats-table">
            <a href="/create/{{exploration_id}}#/gui/{{state.id}}">
              {{state.name}}
            </a>
          </td>
          <td class="oppia-stats-table">
            {% for answer in state.answers %}
              {{answer}}<br>
            {% endfor %}
          </td>
        </tr>
      {% endfor %}
    </table>

  </div>
{% endblock %}
